package com.siae.utils;

public enum BizCode {
    UNKNOWN(0,"未知错误"),
    SUCCESS(2000,"操作成功"),

    FAIL(5000,"操作失败"),
    LOGIN_FAILURE(5001,"登录失败"),
    NO_DATA(5002,"没有查询到数据"),
    FILE_UPLOAD_ERROR(5003,"文件上传失败"),
    DATA_VALID_ERROR(5004,"文件上传失败"),
    INITIAL_PASSWORD_ERROR(5005,"初始密码错误"),
    SYSTEM_ERROR(5500,"系统错误,请查看日志"),

    BLANK_ERROR(6000,"关键词为空"),
    NAME_ALREADY_EXIST(7000,"名称已存在"),

    USER_NOT_EXIST(1001,"用户不存在"),
    USER_ACT_PWD_ERROR(1002,"用户名或密码错误"),
    USER_PASSWORD_ERROR(1002,"用户密码错误"),
    USER_ALREADY_EXIST(1003,"用户已存在"),
    USER_LOGIN_EXCEED_THE_CAP(1004,"用户登录次数超过上限"),
    USER_NOT_LOGIN(1101,"用户未登录"),
    USER_NOT_AUTHORIZED(1102,"用户未授权"),
    USER_NOT_PERMISSION(1103,"用户无权限");
    private Integer code;
    private String msg;
    BizCode(Integer code, String msg){
        this.code = code;
        this.msg = msg;
    }
    public Integer getCode() {
        return code;
    }
    public String getMsg() {
        return msg;
    }
}
